package com.lqq.designPattern.structural_pattern.adapter.objeactAdapter;

//适配器类（SD兼容TF）
public class SDAdapterTF implements SDCard {

    //声明适配者类
    private TFCard tfCard;

    public SDAdapterTF(TFCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSD() {
        System.out.println("Adapter read TFCard");

        return tfCard.readTF();
    }

    @Override
    public void writeSD(String data) {
        System.out.println("Adapter write TFCard");
        tfCard.writeTF(data);
    }
}
